#ifndef JPEG_ENCODER_HEADER_
#define JPEG_ENCODER_HEADER_
#include <fcntl.h>
#include <sys/ioctl.h>
#include <mpp_help.h>
#include <aic_mng.h>
#include <sys/stat.h>
#include <sys/time.h>
#include "sample_comm.h"
#include "higo_main.h"

typedef struct VencConfig{
	VENC_GOP_ATTR_S stGopAttr;
	PIC_SIZE_E enSize;
	PAYLOAD_TYPE_E enType;
	SAMPLE_RC_E enRcMode;
	HI_U32  u32Profile;
	HI_BOOL bRcnRefShareBuf;
}VencConfig;


typedef struct JpegEncoder_{
    bool isWorking;
	int VencFd;
	EvtMon *emon;
	SIZE_S pstSize;
	VencConfig VencConf;
}JpegEncoder;
#define JPEG_PATH  "/hiopenais/pic"
#define JPEG_VENC_CHN_NUM 3
bool creatJpegEncoder(int w,int h);
void destoryJpegEncoder(void);
bool feedJpegEncoder(VIDEO_FRAME_INFO_S* frm);
#endif
